<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <base href="${request.contextPath}/"/>
    <meta charset="UTF-8">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,minimum-scale=1.0">
    <title>漠河智慧社区</title>
    <link href="Content/wechat/css/reset.css" rel="stylesheet" type="text/css">
    <script src="Content/wechat/js/jquery.min.js"></script>

    <link href="Content/wechat/css/zhengWuFaBu.css" rel="stylesheet" type="text/css">
    <link href="Content/wechat/css/index.css" rel="stylesheet" type="text/css">

    <!--字体缩放-->
    <script src="Content/wechat/js/ziti.js"></script>
    <!--end 字体缩放-->
    <!--页码js-->
    <script src="Content/wechat/js/myPagination.js"></script>
    <!--页码-->
    <link href="Content/wechat/css/myPagination.css" rel="stylesheet" type="text/css">
</head>
<body>
<header class="header">
    <img src="Content/wechat/images/tzgg.jpg">

</header>


<div class="zhengWuGongKai">
        <div class="zhengWuGongKai_box">
            <ul class="zhengWuGongKai_box_down" id="liuYan_box12">
<!--                <li>-->
<!--                    <a href="/wechat/home/open/zhengWuFaBu_xx">-->
<!--                        <h3>展示各社区的警务室工作介绍、辖区警讯、社区民警等信息</h3>-->
<!--                        <span>2019-06-23</span>-->
<!--                    </a>-->
<!--                </li>-->

            </ul>
            <!--页码-->
            <div id="pagination2" class="pagination"></div>

            <!--end 页码-->
        </div>

    </div>


<!--页尾-->
<script type="text/javascript" src="Content/wechat/js/foot.js"></script>
</body>
<script>
    window.onload = function () {
        InitAjax2(1);
    }


</script>
<script>
    var pageTotal2 = 0;   //总页数
    var pageSize2 = 8;    //一页显示几个


    function onLoadPaging2() {
        new myPagination({
            id: 'pagination2',
            curPage: 1, //初始页码
            pageTotal: pageTotal2, //总页数
            pageAmount: pageSize2,  //每页多少条
            pageSize: 3, //可选,分页个数

            getPage: function (page) {
                //获取当前页数
                InitAjax2(page)
            }
        })
    }

    function InitAjax2(pageNum2) {
        $.ajax({
            url: "/wechat/home/notice/selectListall",
            type: 'post',
            dataType: 'json',
            data: {
                pagination: "{page:\"" + pageNum2 + "\",rows:\"" + pageSize2 + "\",sidx:\"date desc\",sord:\"\"}"
            }, success: function (result) {
                ajaxCallBack2(result);
            }

        })
    }

    function ajaxCallBack2(data) {
        var insetViewData2 = ""; //视图数据
        $.each(data.data.rows, function (index, items) {

            insetViewData2 += " <li>\n" +
                "                <a href=\"/wechat/home/notice/tongzhigogngao_xx?id="+items.id+"\">\n" +
                "                    <h3>"+items.publicitytitle+"</h3>\n" +
                "                    <span>"+items.date.substring(0,10)+"</span>\n" +
                "                </a>\n" +
                "            </li>";


        });
        $("#liuYan_box12").html(insetViewData2);
        if (pageTotal2 == 0) {
            pageTotal2 = data.data.total;
            onLoadPaging2()
        }
    }


</script>
</html>
